//
//  ActivityUIView.m
//  UI03_homework
//
//  Created by aaaaaa on 16/6/7.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ActivityUIView.h"

@implementation ActivityUIView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (void)dealloc
{
    [_imageView release];
    [_lable release];
    [super release];
}

- (instancetype)initWithFrame:(CGRect)frame withImageName:(NSString *)iamgeName withLableText:(NSString *)lableText{
    self = [super initWithFrame:frame];
    if (self) {
        self.imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:iamgeName]];
        self.lable = [[UILabel alloc] init];
        self.lable.text = lableText;
        
        self.imageView.frame = CGRectMake(0, 0, frame.size.width * 0.09, 25);
        self.lable.frame = CGRectMake(frame.size.width * 0.1, 0, frame.size.width * 0.9, frame.size.height);
        
        self.lable.numberOfLines = 2;
        
        [self addSubview:self.imageView];
        [self addSubview:self.lable];
        
        [_imageView release];
        [_lable release];
    }
    return self;
}


@end
